 package org.alex.samples.model;

import java.io.Serializable;
import java.util.Set;

import javax.annotation.Generated;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name = "exam_test_type")
public class ExamTestType implements Serializable {// 考题类型表

	private static final long serialVersionUID = -6530168542617015609L;

	@Id
	@GeneratedValue
	@Column(name = "id", nullable = false)
	private Integer id;

	@Column(name = "test_type", length = 45, nullable = false)
	private String testType;

	@Column(name = "test_type_score", nullable = false)
	private Integer testTypeScore;

	
	@OneToMany(mappedBy = "examTestType" , fetch=FetchType.EAGER)
	private Set<ExamTest> examTest;

	public ExamTestType() {
		super();
	}

	public ExamTestType(Integer id, String testType, Integer testTypeScore, Set<ExamTest> examTest) {
		super();
		this.id = id;
		this.testType = testType;
		this.testTypeScore = testTypeScore;
		this.examTest = examTest;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTestType() {
		return testType;
	}

	public void setTestType(String testType) {
		this.testType = testType;
	}

	public Integer getTestTypeScore() {
		return testTypeScore;
	}

	public void setTestTypeScore(Integer testTypeScore) {
		this.testTypeScore = testTypeScore;
	}

	public Set<ExamTest> getExamTest() {
		return examTest;
	}

	public void setExamTest(Set<ExamTest> examTest) {
		this.examTest = examTest;
	}

}
